Tegra: PMC: lock SCRATCH22 register
authorVarun Wadekar <[email protected]>
Thu, 16 Jul 2015 05:08:11 +0000 (10:38 +0530)
committerVarun Wadekar <[email protected]>
Fri, 17 Jul 2015 13:36:47 +0000 (19:06 +0530)
The PMC Scratch22 register contains the CPU reset vector to
be used by the warmboot code to power up the CPU while resuming
from  system suspend. This patch locks this PMC register to avoid
any further writes.

Signed-off-by: Varun Wadekar <[email protected]>
plat/nvidia/tegra/common/drivers/pmc/pmc.c

index 6e7f23c6cf32adcf6f260bf8d24b2c53fce8d474..d48b575497d363f9e0b38e96b2177410b6b334ee 100644 (file)
@@ -105,6 +105,11 @@ void tegra_pmc_lock_cpu_vectors(void)
 {
        uint32_t val;
 
+       /* lock PMC_SECURE_SCRATCH22 */
+       val = tegra_pmc_read_32(PMC_SECURE_DISABLE2);
+       val |= PMC_SECURE_DISABLE2_WRITE22_ON;
+       tegra_pmc_write_32(PMC_SECURE_DISABLE2, val);
+
        /* lock PMC_SECURE_SCRATCH34/35 */
        val = tegra_pmc_read_32(PMC_SECURE_DISABLE3);
        val |= (PMC_SECURE_DISABLE3_WRITE34_ON |